﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using System.Text;
using System.Threading.Tasks;
using ReactiveUI;

namespace TestWpfReactiveUI
{
    public class MainViewModel : ReactiveObject, IActivatableViewModel
    {
        public MainViewModel()
        {
            this.WhenActivated(dd =>
            {
                Trace.TraceInformation("MainViewModel.WhenActivated()");
                Observable.Interval(TimeSpan.FromSeconds(1))
                   .Subscribe()
                   .DisposeWith(dd);
            });
        }

        public ViewModelActivator Activator { get; } = new();
    }
}
